﻿import QtQuick 2.0
import QtQuick.Layouts 1.1

Rectangle {
    property var picpath: ""
    property string topv: ""
    property string numbv: ""
    property var dcolor: ""
    property int yz: 0
    property bool more: false

    width: parent.width
    height: parent.height

    signal morecli();
    signal allcli();

    Rectangle{
        x:0*dp
        y:0*dp
        width: parent.width
        height: parent.height/2
        radius: 12
        border.color: "#DEDEDE"
        z:0
    }
    Rectangle{
        x:0*dp
        y:parent.height/2
        width: parent.width
        height: parent.height/2
        radius: 12
        border.color: "#DEDEDE"
        color: dcolor
        z:0
    }
    Rectangle{
        x:0*dp
        y:0
        width: parent.width
        height: parent.height-6*dp
        border.color: "#DEDEDE"
        radius: 12
        z:1
    }

    Image {
        x:20*dp
        y:20*dp
        height: 20*dp
        width: 20*dp
        source: picpath
        z:1
    }
    Text {
        x:50*dp
        y:20*dp
        text: topv
        z:1
    }

    Row{
        spacing: 5*dp
        x:20*dp
        y:60*dp
        z:1
        Text {
            text: numbv
            font.pixelSize: config.fontsize + 18*dp
            color: more?"#FF0000":"black"
            z:1
        }
        Image {
            visible: more
            y:parent.height-42*dp
            height: 28*dp
            width: 28*dp
            source: "qrc:/picture/tj_sjd.png"
            z:1
        }
    }
    Text {
        visible: more
        x:parent.width-70*dp
        y:parent.height-35*dp
        width: 60*dp
        height: 30*dp
        font.underline: true
        text: "保养指导"
        color: "#1677FF"
        font.pixelSize: config.fontsize
        z:1
        MouseArea{
            anchors.fill: parent
            onClicked: {
                morecli()
            }
        }
    }
    MouseArea{
        anchors.fill: parent
        onClicked: {
            allcli()
        }
    }
}
